package com.ruoyi.cderp.domain;

import java.util.List;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 物料清单对象 bom
 *
 * @author ruoyi
 * @date 2025-06-10
 */
public class Bom extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private String id;

    /** BOM编号 */
    @Excel(name = "BOM编号")
    private String code;

    /** 成品ID */
    @Excel(name = "成品ID")
    private String productId;

    // 成品对象
    private Product product;

    /** 版本号 */
    @Excel(name = "版本号")
    private String version;

    /** 是否有效(0:无效,1:有效) */
    @Excel(name = "是否有效(0:无效,1:有效)")
    private Integer isActive;

    /** BOM明细信息 */
    private List<BomItem> bomItemList;

    public void setId(String id)
    {
        this.id = id;
    }

    public String getId()
    {
        return id;
    }
    public void setCode(String code)
    {
        this.code = code;
    }

    public String getCode()
    {
        return code;
    }
    public void setProductId(String productId)
    {
        this.productId = productId;
    }

    public String getProductId()
    {
        return productId;
    }

    public Product getProduct() {
        return product;
    }

    public void setProduct(Product product) {
        this.product = product;
    }

    public void setVersion(String version)
    {
        this.version = version;
    }

    public String getVersion()
    {
        return version;
    }
    public void setIsActive(Integer isActive)
    {
        this.isActive = isActive;
    }

    public Integer getIsActive()
    {
        return isActive;
    }

    public List<BomItem> getBomItemList()
    {
        return bomItemList;
    }

    public void setBomItemList(List<BomItem> bomItemList)
    {
        this.bomItemList = bomItemList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("code", getCode())
            .append("productId", getProductId())
                .append("product", getProduct())
            .append("version", getVersion())
            .append("isActive", getIsActive())
            .append("remark", getRemark())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("bomItemList", getBomItemList())
            .toString();
    }
}
